import React from 'react';
import {View} from "react-native";
import TitleView from "../components/title/TitleView";
import NavigatorBar from "../components/navigator/NavigatorFactory";
import AddFriendModal from "./modal/AddFriendModal";
import AddRoomModal from "./modal/AddRoomModal";
import {pageStyle} from "./style/pageStyle";
import EButton from "../components/utils/EButton";


export default class AboutPage extends React.Component  {
    constructor(props:any) {
        super(props);
    }

    componentDidMount(): void {
    }



    onAddFriendPress(){
        NavigatorBar.push("AddFriendModal", {})
    }

    onModifyUserInfoPress(){
        NavigatorBar.push("ModifyUserInfoPage", {})
    }

    onAddRoomPress(){
        NavigatorBar.push("AddRoomModal")
    }


    render() {
        return (
            <View style={pageStyle.container}>
                <TitleView title={'关于'} />
                <View style={{margin:4}}>
                  <EButton title={'添加好友'} onPress={()=>{this.onAddFriendPress()}} />
                </View>
                <View style={{margin:4}}>
                    <EButton title={'添加好友到群'} onPress={()=>{this.onAddRoomPress()}} />
                </View>
                <View style={{margin:4}}>
                    <EButton title={'编辑信息'} onPress={()=>{this.onModifyUserInfoPress()}} />
                </View>
            </View>
        );
    }
}
